

public class Test {

	public Test() {
		
		
		// test de methodes copy et clone
		/*
		Grid grid2 = grid.clone();
		
		grid.pieceColor = 422208170098688L;
		grid.piecePosition = 422212456612096L;
		grid.pieceType = 421112961761536L;
		
		Grid grid3 = new Grid();
		grid3.copyGrid(grid);
		
		System.out.print(grid.equals(grid2) + "\n");
		System.out.print(grid.equals(grid3) + "\n");
		System.out.print(grid == grid3);
*/
		
	
		// ne devrait rien donner et retourner toujours 0

		/*
		
		System.out.println("On essaie de bouger les pusher blancs");

		for (int i = 56; i < 64; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		System.out.println("On essaie de bouger les pusher noirs");

		// ///////////////////////////////////////////

		for (int i = 0; i < 8; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		// ///////////////////////////////////////////////////////

		System.out.println("On essaie de bouger les pushee blancs");

		// ///////////////////////////////////////////

		for (int i = 48; i < 56; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);

		}
		
		System.out.println("On essaie de bouger les pushee noirs");

		// ///////////////////////////////////////////


		for (int i = 8; i < 16; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);

		}
		
		
		System.out.println("On essaie de bouger les pushee blancs");

		// ///////////////////////////////////////////


		for (int i = 48; i < 56; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println(i + ":" + "lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);

		}


		
		
		
		
		System.out.println("On essaie de bouger les pusher blancs");

		for (int i = 56; i < 64; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		System.out.println("On essaie de bouger les pusher noirs");

		// ///////////////////////////////////////////

		for (int i = 0; i < 8; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		/////////////////////////////////////////////////////////////
		
		
		System.out.println("On essaie de bouger les pushee noirs");

		// ///////////////////////////////////////////


		for (int i = 16; i < 24; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);

		}
		
		
		System.out.println("On essaie de bouger les pushee blancs");

		// ///////////////////////////////////////////


		for (int i = 40; i < 48; i++) {
			grid.frontMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println(i + ":" + "lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);

		}


		////////////////////////////////////////////////////////////////////////////////
		
		
		System.out.println("On essaie de bouger les pusher blancs");

		for (int i = 48; i < 56; i++) {
			grid.rightDiagonalMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		System.out.println("On essaie de bouger les pusher noirs");

		// ///////////////////////////////////////////

		for (int i = 8; i < 16; i++) {
			grid.rightDiagonalMove(i);
			grid.display();

			String movePieceType = "";
			String killedMovePieceType = "";

			switch (grid.getLastMovePiece()) {
			case 0:
				movePieceType = "EMPTY";
				break;
			case 1:
				movePieceType = "BPUSHEE";
				break;
			case 2:
				movePieceType = "BPUSHER";
				break;
			case 3:
				movePieceType = "WPUSHEE";
				break;
			case 4:
				movePieceType = "WPUSHER";
				break;
			}

			switch (grid.getLastMoveKilledPiece()) {
			case 0:
				killedMovePieceType = "EMPTY";
				break;
			case 1:
				killedMovePieceType = "BPUSHEE";
				break;
			case 2:
				killedMovePieceType = "BPUSHER";
				break;
			case 3:
				killedMovePieceType = "WPUSHEE";
				break;
			case 4:
				killedMovePieceType = "WPUSHER";
				break;
			}
			System.out.println("lastMove: " + grid.getLastMove() + ","
					+ "initial point: " + grid.getLastMoveInitialPoint()
					+ ", final point: " + grid.getLastMoveFinalPoint()
					+ ", piece Type: " + movePieceType
					+ ", killed piece type: " + killedMovePieceType);
		}

		// ///////////////////////////////////////////////////////
		
		
		System.out.print("\n\n\nOn essaie de bouffer des pieces \n\n\n");
		
		//grid.pieceColor = 422208170098688L;
		//grid.piecePosition = 422212456612096L;
		//grid.pieceType = 421112961761536L;
		
		
		grid.rightDiagonalMove(34);
		
		grid.display();
		
		
		String movePieceType = "";
		String killedMovePieceType = "";

		switch (grid.getLastMovePiece()) {
		case 0:
			movePieceType = "EMPTY";
			break;
		case 1:
			movePieceType = "BPUSHEE";
			break;
		case 2:
			movePieceType = "BPUSHER";
			break;
		case 3:
			movePieceType = "WPUSHEE";
			break;
		case 4:
			movePieceType = "WPUSHER";
			break;
		}

		switch (grid.getLastMoveKilledPiece()) {
		case 0:
			killedMovePieceType = "EMPTY";
			break;
		case 1:
			killedMovePieceType = "BPUSHEE";
			break;
		case 2:
			killedMovePieceType = "BPUSHER";
			break;
		case 3:
			killedMovePieceType = "WPUSHEE";
			break;
		case 4:
			killedMovePieceType = "WPUSHER";
			break;
		}
		System.out.println("lastMove: " + grid.getLastMove() + ","
				+ "initial point: " + grid.getLastMoveInitialPoint()
				+ ", final point: " + grid.getLastMoveFinalPoint()
				+ ", piece Type: " + movePieceType
				+ ", killed piece type: " + killedMovePieceType);
		
		
		
		grid.rightDiagonalMove(26);
		
		grid.display();
		
		movePieceType = "";
		killedMovePieceType = "";

		switch (grid.getLastMovePiece()) {
		case 0:
			movePieceType = "EMPTY";
			break;
		case 1:
			movePieceType = "BPUSHEE";
			break;
		case 2:
			movePieceType = "BPUSHER";
			break;
		case 3:
			movePieceType = "WPUSHEE";
			break;
		case 4:
			movePieceType = "WPUSHER";
			break;
		}

		switch (grid.getLastMoveKilledPiece()) {
		case 0:
			killedMovePieceType = "EMPTY";
			break;
		case 1:
			killedMovePieceType = "BPUSHEE";
			break;
		case 2:
			killedMovePieceType = "BPUSHER";
			break;
		case 3:
			killedMovePieceType = "WPUSHEE";
			break;
		case 4:
			killedMovePieceType = "WPUSHER";
			break;
		}
		System.out.println("lastMove: " + grid.getLastMove() + ","
				+ "initial point: " + grid.getLastMoveInitialPoint()
				+ ", final point: " + grid.getLastMoveFinalPoint()
				+ ", piece Type: " + movePieceType
				+ ", killed piece type: " + killedMovePieceType);
		
		grid.rightDiagonalMove(18);
		
		grid.display();
		
		movePieceType = "";
		killedMovePieceType = "";

		switch (grid.getLastMovePiece()) {
		case 0:
			movePieceType = "EMPTY";
			break;
		case 1:
			movePieceType = "BPUSHEE";
			break;
		case 2:
			movePieceType = "BPUSHER";
			break;
		case 3:
			movePieceType = "WPUSHEE";
			break;
		case 4:
			movePieceType = "WPUSHER";
			break;
		}

		switch (grid.getLastMoveKilledPiece()) {
		case 0:
			killedMovePieceType = "EMPTY";
			break;
		case 1:
			killedMovePieceType = "BPUSHEE";
			break;
		case 2:
			killedMovePieceType = "BPUSHER";
			break;
		case 3:
			killedMovePieceType = "WPUSHEE";
			break;
		case 4:
			killedMovePieceType = "WPUSHER";
			break;
		}
		System.out.println("lastMove: " + grid.getLastMove() + ","
				+ "initial point: " + grid.getLastMoveInitialPoint()
				+ ", final point: " + grid.getLastMoveFinalPoint()
				+ ", piece Type: " + movePieceType
				+ ", killed piece type: " + killedMovePieceType);
				
				System.out.print(grid.getPiecesCountColor(Constants.WHITE) + "\n");
				System.out.print(grid.getPiecesCountColor(Constants.BLACK) + "\n");
				
				*/
	}
	
	


}
